falloutmodsfandomcom-20200214-history
Generating images in 3ds Max
Here are some methods of generating images in 3ds Max for further use as a basis for creating Fallout graphics. Introduction Some techniques for generating images using 3ds Max are outlines in this article. Most of the methods can be used in other similiar programs. For example, the original Fallout developers used Lightwave Animation software for making talking heads. Setting the scene Generating even a small picture of an object lying on the ground in 3ds Max requires a small studio crew. Key elements of the studio are: a filming plane or simple horizontal plane, the target object, the camera, lighting sources, a reference object and a helper centering object. Let us consider each of these elements in order. Filming plane The filming plane is just a flat parallelepiped, or turned into a grid of closed rectangular shapes (Create\Shapes\Splines\Rectangle). For a coordinate system it is easiest to adopt a global system of coordinates (Coordinate System\World). This is an orthogonal triple of vectors: X-axis from left to right, Y axis away from the plane of the screen into the screen, and the Z axis is directed vertically upwards. The filming plane should be located in the XY plane, at height zero on the Z axis. The pivot point of the filming plane should be set at its geometric center, and then place the object at zero coordinates. The area of the filming plane should be sufficient to ensure that the target object fits within it. More about that later. Make the filming plane an opaque material, painted in pure colors (blue, green or red). It is important that the color of the material will be radically different from any of the colors present in the target object. This solid color filming plane will determine what color will be designated as transparent in the FRM-file. Here are the approximate characteristics of a "green screen": Type = Standard, Shading = Blinn, Ambient = Diffuse = Specular = Filter = {0,255,0}(RGB), Shininess = 25, Shin. Strength = 5, Self-Illumination = 0, Opacity = 100. Target object The target object should be added to the scene as if the filming plane was the game floor, and the origin of the coordinate system corresponds to the center of the game hex that the object is on. In other words, the geometric center of the object should be directly above the center of the coordinate system in the XY plane, with the base of the object on the filming plane. If the width of a hexagonal tile from side to side is 32 units, then the length of a hexagonal tile from corner to corner is equal to 32/cos(30°) or 36.95042 units. Projected at an angle onto the player's screen, this distance appears to cover 16 units (and 16 pixels). Camera The most important object in the scene is the camera. Create a simple freely moving camera (Create\Cameras\Standard\Free). Move it exactly to the origin. Set the value of the camera rotation angle to zero on all three axes. It is important that the axis of the camera coincides with the Y axis and the viewfinder is directed towards increasing values on the Y axis. Then move it along the Y axis in the negative direction to the edge of the filming plane, without changing the X and Z coordinates. The easiest way to do it is through the dialog box, specifying the exact coordinates. Then go into the camera reference point correction mode (Hierarchy\Pivot\Affect Pivot Only), and set the reference point coordinates to the origin of the coordinate system (i.e., set them to zero). Set the local coordinate system reference point of the camera to the global coordinate system of the scene (Hierarchy\Pivot\Align to World). Exit reference point correction. Now orient the camera angle to the following values: X axis = -25.65891 degrees (which can also be expressed as -asin(cos(30°)/2) degrees), Y = 0 degrees, and Z = -30 degrees. Click the Advanced tab for editing objects and check Orthographic Projection. Then select any of the 3ds Max display consoles and set it to the view from the camera you have created. Light source You can arrange on your own sources of illumination. The only rule for each light is to set Decay to None. Otherwise, the filming plane will not be evenly lit and you will not get a uniform background. Also, do not use colored light sources, as it also distort the background color. If your item should cast a shadow on the floor in the game, then use one parallel light source (Create\Lights\Standard\Free Direct) to create the shadow. For critter sprites, orient the light source exactly as you did the camera, except set its rotation about the X axis to -75.7 degrees. For tile and wall sprites, the light source angles appear to be different than for critter sprites, however. See how in the shelf sprite the shadow extends behind and to the right of the shelf, whereas in the critter sprite the shadow extends directly underneath and behind the critter. If the angles for the light source in both sprites were the same, then the shadow in the critter sprite would also extend toward the right a little. Best guesstimates for the lighting angles in the shelf sprite are X = -50 degrees, Y = 0 degrees, and Z = -37 degrees. Adjust the characteristics of light sources so that would the edge of their illumination goes beyond the boundaries of the target console display projection. For generating shadows, use the ray-tracing algorithm, which gives clear contrast shadows (check CastShadows and switch Use Ray-Traced Shadows). For all other light sources, disable the generation of shadows. After placing light sources, connect them with the camera as children (using the Select and Link tool). Then, while rotating the camera, they will move in sync and create the same type of lighting, whatever angle the camera is rotated to with respect to the Z axis. For rendering a stationary object this is not necessary. But if in the future the camera is used for rendering characters, then the camera will be installed in six different positions with different angles relative to the Z axis. Then when changing the angle of the camera, you won't break the model lighting and shadow generation. Important features A reference object is a square or a hexagonal model on which to test renders so you can compare pixel by pixel dimensions of your scene and the pixels on the game screen. For example, to ensure that the test object's render size is exactly twice the width of the game hex. In the future, focusing on this marker object, you can more accurately establish the size of the target object. Before you perform the final render, of course, you must hide the object. An auxiliary centering object is just a small cube one-color colors, which is on test renders to appear in the form of a single pixel. Place it in the exact center of the coordinate system. Ideally, it should be just at the base of the target object. In the future, combining an image with this object, it reduces to a single pixel and with the final image of your object, you will be able to correctly set the parameters of centering your sprite. But more about that later. The following is to ensure that the monochrome filming plane completely fills the view of the camera. This can be achieved by using the field of view adjustment on the camera control panel (Field-of-View). This is easier than to change the focal length of the camera and its other characteristics. Naturally, you can also try to adjust the lighting and the size of the object by holding a series of test renderings. For ease of rendering setup disable anti-aliasing (clear the Anti-Aliasing option). Then the final rendering will not contain a mix of the filming plane background color and the color of the target object on the edge of the image. Having achieved satisfactory results, you should convert the final rendering to BMP or TIFF, using the full-color mode (24 bit). Actually, this will also be the final result of the image generation phase. Give the image a name. Notes * The translator is not familiar with 3ds Max; please help to correct any inaccurate descriptions or instructions * Adding pictures would help visually aid the readers as opposed to a bunch of writing. If you want to add pitures to this tutorial, feel free External Links Original document: http://www.jochua.nm.ru/docs/appndmax.htm (dead link, in Russian) Category:Fallout 2 tutorials - art